﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchLog.aspx.cs" Inherits="Workflow.Project.SearchLog" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>

    <script type="text/javascript" src="../Scripts/MyJquery.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.pagination.js"></script>
    <script type="text/javascript" src="../Scripts/Pageination.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


        .auto-style1 {
            width: 230px;
        }


    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="table table-bordered definewidth m10">
            <thead>
                <tr>
                    <th>项目号</th>
                    <th>阶段</th>
                    <th>任务责任人</th>
                    <th>项目日志内容</th>
                    <th>完成时间</th>
                    <th>状态</th>
                </tr>               
            </thead>
            <tbody id="Searchresult"></tbody>
            <tbody id="hiddenresult" style="display:none">
                <% for (int i = 0; i < resultList.Count; i++) { %>
                <tr class="result">
                    <td><% =resultList[i].PJId %></td>
                    <td><% =resultList[i].Stage %></td>
                    <td><% =resultList[i].Person %></td>
                    <td><% =resultList[i].LogContent %></td>
                    <td><% =resultList[i].CompleteDate.ToShortDateString() %></td>
                    <td><label class="lblStatues"><% =resultList[i].Statues %></label></td>
                </tr>
                <% }%>
            </tbody>
         </table>
         <div id="Pagination" class="pagination definewidth m10"></div>
    </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            var count = "<% =resultList.Count%>";
            if (count >= 10) {
                $("#Pagination").show();
            } else {
                $("#Pagination").hide();
            }
            $(".lblStatues").each(function () {
                if ($(this).text() == "正常") {
                    $(this).parent().attr("class", "greenColor");
                }
                else if ($(this).text() == "影响") {
                    $(this).parent().attr("class", "yellowColor");
                }
                else if ($(this).text() == "报警") {
                    $(this).parent().attr("class", "redColor");
                }
            });
        });

    </script>
</body>
</html>
